package com.lingnuo.mapper;

import com.lingnuo.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * AdminMapper - 管理员界面Mapper层
 *
 * @author 程序员-Su_xiaoxiang
 * @date 2025/3/26 15:35
 */
@Mapper
public interface AdminMapper {
    // 管理员登录
    @Select("SELECT * FROM admins WHERE admin_username = #{adminUsername} AND admin_password = #{adminPassword}")
    Admin adminLogin(Admin admin);
    // 管理员注册
    @Insert("INSERT INTO admins (admin_username, admin_password) VALUES (#{adminUsername}, #{adminPassword})")
    int adminRegister(Admin admin);
}
